package com.example.springbootdemo.importselector;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Import;

@SpringBootApplication
@Import(CustomImportSelector.class)
public class ImportSelectorDemo {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(ImportSelectorDemo.class, args);

        String customBeanSelector = (String) applicationContext.getBean("customBeanSelector");
        System.out.println(customBeanSelector);
    }
}
